const express = require('express');
const router = express.Router();
const authController = require('../controllers/authController');
const { authMiddleware } = require('../middlewares/auth');

// 登录路由
router.post('/login', authController.login);

// 刷新令牌
router.post('/refresh-token', authController.refreshToken);

// 登出路由
router.post('/logout', authController.logout);

// 获取当前用户信息
router.get('/me', authMiddleware, authController.getCurrentUser);

module.exports = router; 